This invention relates to a method of detecting the red eye that occurred in an image during photographing so as to correct the red eye and correcting the detected red eye to a specified color of pupil.
When a person is photographed with a camera, particularly when it is pointed direct at the person at night with the aid of an electronic flash, the pupils of the person will come out red or golden. This phenomenon, commonly called the red-eye effect, occurs since the burst of the flash which comes direct into the pupils that dilate in a dark area is reflected direct back to the film to create an undesirable image. The red-eye effect comes about in two ways, one producing red pupils and the other golden pupils (on the pages that follow, the two cases are collectively referred to as “red eye”).
In order to reduce the pupil dilation which can cause red eye, there has been developed a camera with a built-in electronic flash having a capability for firing a series of low-intensity bursts before the main full-intensity burst upon photographing. However, this approach is incapable of completely preventing the red-eye effect and it further involves serious problems such as producing unnatural facial expressions due to the stroboscopic series and requiring a special mechanism for firing pre-flash bursts.
As alternatives, various methods have been recently proposed with a view to preventing red eye from occurring in a reproduced image by digital image processing techniques.
Methods of correcting red eye and methods basic to them which can extract a principal subject such as face or red-eye areas from the image are disclosed in a lot of patents including JP 2000-76427 A, JP 2000-148980 A, JP 2000-137788 A and JP 2000-149018 A.
The method disclosed in JP 2000-76427 A comprises the steps of dividing the image area into a plurality of regions having peaked distribution shapes on the basis of a color value as an extraction element which is obtained from hue, saturation and lightness, calculating a characteristic quantity for the image of a designated outline of the eye in a plurality of positions, extracting the image of the pupil on the basis of the values of the obtained characteristic quantities and applying a corrective measure for the red-eye effect.
According to the method disclosed in JP 2000-148980 A, even when the density of an image region corresponding to a human face is deviated to either the higher or lower side as in a scene taken under back light or with an electronic flash going off, the region corresponding to the human face is identified with high precision and the extracted face region is utilized in image processing, such as correction of the red-eye effect, that is applied to the face region or only a portion of it.
The method disclosed in JP 2000-137788 A comprises the steps of extracting a candidate face region presumably corresponding to a human face from the image to be processed, dividing the candidate face region into a specified number of blocks, calculating the integral value of edge intensity for each block along the vertical axis of the image and using the characteristic quantity calculated for each block so as to ensure that the region corresponding to the human face is extracted with high precision by simple processing based on the internal structure of the human face.
The method disclosed in JP 2000-149018 A comprises the steps of extracting a plurality of candidate face regions presumably corresponding to a human face on the basis of image data about the image to be processed, calculating the degree of overlap for a pair of overlapping candidate face regions, setting a weighting score for each of the candidate face regions overlapping other candidate face regions such that said weighting score satisfies specified conditions, and comparing said weighting score with a threshold value, whereby the effect of erroneously extracting the region presumably corresponding to the principal part of the image is reduced to ensure extraction of the actual face region from the candidate face regions.
These prior art face extracting and red-eye correcting methods have achieved the intended results on predetermined subjects. However, image inputting involves diverse types of input images (diverse input types) such as from negative film, positive film or digital camera and input from a digital camera differs from input from films such as negatives or positives in terms of the processing space for image data (processing region), the image format determined by bit depth, the scan condition, or the like; this has prevented the performance of unified processing, causing a problem with processing efficiency.